<template>
	<view class="step">
		<view class="step_box">
			<!-- 左侧进度线 -->
			<view class="step_left">
			</view>
			
			<view class="step_right">
				<view class="right_content" v-for="(item,index) in stepData" :key="index">
					<!-- 进度名称 -->
					<!-- <block v-if="item.isNow == 0">
						<view class="title" :style="{color:item.type == 1? '#999':'#999'}">{{item.name}}</view>
					</block>
					<block v-if="item.isNow == 1">
						<view class="title" :style="{color:item.type == 1? colors:'#999'}">{{item.name}}</view>
					</block> -->
					<view class="title">{{item.status}}</view>
					<!-- 进度时间 -->
					<!-- <view class="times" v-if="item.type == 1">{{item.time}}</view> -->
					<view class="times">{{item.time}}</view>
					<!-- 进度详情备注 -->
					<view class="result" v-if="item.desc && item.desc !== ''"><text style="color: #999;">{{item.desc}}</text></view>
					<!-- 右侧的进度点 -->
					<!-- <view class="status"
						:style="{background: item.isNow == 1?colors:'#ccc',borderColor: item.isNow == 1?colors:'#ccc'}">
						<image v-if="item.isNow==1" src="/static/duihao.png"></image>
					</view> -->
					<view class="step_status" :style="{background: index == 0?colors:'#ccc',borderColor: index == 0?colors:'#ccc'}">
						<!-- {{item.isNow == 1?"√":''}} -->
						<image src="/static/duihao.png"></image>
					</view>
				</view>
			</view>
		</view>
	
	</view>
</template>


<script>

	export default {
		data() {
			return {};
		},
		props: {
			colors: {
				type: String
			},
			stepData: {
				type: Array
			}
		},
		methods: {

			jumpNext(item) {
				
				this.$emit("itemClick",item);
			}

		}
	};
</script>


<style lang="scss" scoped>
	.step {
		padding: 30rpx 20rpx;
		// margin-bottom: 20upx;
	}

	.step_box {
		margin: 0 20upx;
		margin-left: 20upx;
		display: flex;

		.step_left {
			width: 2upx;
			display: block;
			background-color: #DDDDDD;
			overflow: hidden;
		}

		.step_right {
			margin-left: 20rpx;
			margin-top: -10upx;

			.right_content {
				position: relative;
				margin-bottom: 30upx;
				padding-left: 16rpx;
				.title {
					font-size: 28upx;
					font-family: Source Han Sans CN;
					font-weight: 500;
					color: #333333;
				}

				.times {
					font-size: 22upx;
					font-family: Source Han Sans CN;
					font-weight: 400;
					color: #999999;
					line-height: 36upx;
				}

				.step_status {
					width: 32rpx;
					height: 32rpx;
					border-radius: 50%;
					border: 2rpx solid #ccc;
					position: absolute;
					top: 6rpx;
					background-color: #ccc;
					left: -36upx;
					line-height: 30rpx;
					text-align: center;
					image{
						width: 20rpx;
						height: 20rpx;
					}
				}

				.result {
					// padding: 10upx 15upx;
					// background-color: #F6F6F6;
					font-size: 24rpx;
					// margin-top: 10upx;
					// border: 1upx dashed #ddd;
				}

				&:last-of-type {
					margin-bottom: 0;

					.step_status {
						top: 14rpx;
					}

					&::before {
						content: '';
						width: 6upx;
						height: 100%;
						background-color: #FFFFFF;
						position: absolute;
						top: 22upx;
						left: -24upx;
					}
				}
			}
		}
	}
</style>